Fix sublibrary QA Aqua piracy via treat_as_own for owned types#616
Merged
ChrisRackauckas merged 1 commit intoJun 15, 2026
Merged
Conversation
The ArrayPartitionAnyAll and ShorthandConstructors sublibrary QA groups (added in SciML#614) fail Aqua's piracy check because they extend Base functions on RecursiveArrayTools-owned types: * ArrayPartitionAnyAll: any/all on ArrayPartition * ShorthandConstructors: getindex(::Type{VA}, ...), getindex(::Type{AP}, ...) These are intentional methods on types the sublibraries hard-depend on, not type piracy. Pass them via Aqua.test_all(...; piracies = (; treat_as_own = ...)) so the owned-type extensions are not flagged. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The sublibrary
QAgroups added in #614 currently fail onmasterfor two of the three sublibraries. The AquaPiracytest reports the sublibraries' methods as type piracy:any/allextended onArrayPartitiongetindex(::Type{VA}, xs...)andgetindex(::Type{AP}, xs...)These are not piracy:
ArrayPartition,VA, andAPare types owned byRecursiveArrayTools, which each sublibrary hard-depends on. ExtendingBasefunctions on a dependency's owned types is the intended design of these subpackages (it is the entire reason they exist, as documented in their module docstrings).Fix
Pass the owned types through Aqua's documented
treat_as_ownmechanism:No package source changes; only the QA test configuration is corrected.
Local verification (Julia 1.10, the package's
[compat]floor)Ran the full
test/qa/qa.jl(Aqua + JET) for each sublibrary against the in-tree source:Both groups now pass entirely (Aqua piracy included, JET unaffected).
Out of scope (reported separately)
no matching method found similar_type(::Any)incopyto!/fill!/broadcast, because the ragged container's.ufield isAny-typed). The JET findings are real and would require type-stabilizing the ragged container, so RaggedArrays is intentionally left out of this focused PR.Unsatisfiableresolver error at the--min=@deps --julia=1.10downgrade minimum — a compat-floor conflict, separate from this QA issue.Please ignore until reviewed by @ChrisRackauckas.